<script lang="ts" setup>
  defineProps<{
    status: string;
  }>();
</script>

<template>
  <div class="event-card">
    <div class="event-card-icon">
      <img src="https://img95.699pic.com/xsj/11/8l/q7.jpg%21/fh/300" />
    </div>
    <div class="event-card-info">
      <div class="event-card-name">
        <div class="event-card-name-c"> 梅赛德斯奔驰2023巡回赛 </div>
        <a-tag :color="status === 'open' ? 'green' : 'gray'">
          {{ status === 'open' ? '已公布' : '未公布' }}
        </a-tag>
      </div>
      <div class="event-card-desc">ID: 202308193891</div>
    </div>
  </div>
</template>

<style lang="less" scoped>
  .event-card {
    display: flex;
    align-items: center;
    &-icon {
      width: 60px;
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
      img {
        max-width: 100%;
        max-height: 100%;
      }
    }

    &-info {
      flex: 1;
      min-width: 0;
      margin-left: 10px;
    }

    &-name {
      font-size: 15px;
      font-weight: 500;
      display: flex;

      &-c {
        flex: 1;
        margin-right: 6px;
      }
    }

    &-desc {
      color: var(--color-text-2);
    }
  }
</style>
